home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / Filezilla Server / FileZilla_Server-0_9_41.exe / source / ExternalIpCheck.h < prev    next >
C/C++ Source or Header  |  2011-11-06  |  2KB  |  59 lines

  1. // FileZilla Server - a Windows ftp server
  2.  
  3. // Copyright (C) 2002-2004 - Tim Kosse <tim.kosse@gmx.de>
  4.  
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9.  
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. #if !defined(AFX_EXTERNALIPCHECK_H__B077D8D7_6883_4DD9_9B0A_2C99562D0930__INCLUDED_)
  20. #define AFX_EXTERNALIPCHECK_H__B077D8D7_6883_4DD9_9B0A_2C99562D0930__INCLUDED_
  21.  
  22. #if _MSC_VER > 1000
  23. #pragma once
  24. #endif // _MSC_VER > 1000
  25.  
  26. #include "AsyncSocketEx.h"
  27.  
  28. class CServerThread;
  29.  
  30. class CExternalIpCheck : public CAsyncSocketEx  
  31. {
  32. public:
  33.     CExternalIpCheck(CServerThread *pOwner);
  34.     virtual ~CExternalIpCheck();
  35.     virtual void TriggerUpdate();
  36.     virtual void OnTimer();
  37.     virtual CStdString GetIP(const CStdString& localIP);
  38.     inline int GetTimerID() const { return m_nTimerID; }
  39.  
  40. protected:
  41.     virtual void Start();
  42.     virtual void OnReceive(int nErrorCode);
  43.     virtual void OnConnect(int nErrorCode);
  44.     virtual void OnClose(int nErrorCode);
  45.  
  46. // Variables
  47. protected:
  48.     int m_nTimerID;
  49.     CStdString m_IP;
  50.     int m_nFailedConnections;
  51.     int m_nRetryCount;
  52.     int m_nElapsedSeconds;
  53.     CServerThread *m_pOwner;
  54.     BOOL m_bActive;
  55.     BOOL m_bTriggerUpdateCalled;
  56. };
  57.  
  58. #endif // !defined(AFX_EXTERNALIPCHECK_H__B077D8D7_6883_4DD9_9B0A_2C99562D0930__INCLUDED_)
  59.